import { createApp } from 'vue'
import App from './App.vue'
import mitt from "mitt"
import router from "./router";
import create from "./utils/create";
import store from './store'

import VueLazyload from './modules/vue-lazyload/index'

import KUI from "./libs/kui";

const app = createApp(App)

//挂载事务总线为全局属性
app.config.globalProperties.$mybus = new mitt()
// app.config.globalProperties.$create = create

app.use(create)

app.use(router)
app.use(store)

app.use(KUI)

app.use(VueLazyload, {
    loading: 'http://localhost:3000/images/loading.png',
    error: 'http://localhost:3000/images/error.png',
    preload: 1,
})

console.log(app.config.globalProperties.$router)

app.mount('#app')